/**
 * Created by Fandy on 2016/3/22.
 */
!function (e) {
    e.onReady = function (o, t) {
        if (t) {
            var r = function () {
                e[o] ? t() : setTimeout(function () {
                    r(o, t)
                }, 500)
            };
            r(o, t)
        }
    };
    var o = /complete|loaded/;
    e.afterLoad = function (t) {
        o.test(document.readyState) && document.body ? setTimeout(t) : e.addEventListener("load", t, !1)
    }
}(window), function (e) {
    var o, t = {script: "src", link: "href"}, r = "b.yzcdn.cn", n = "su.yzcdn.cn";
    e._cdnFallback = function (a) {
        var i, c, l, d, f, g, m, u;
        if (i = a.nodeName.toLowerCase(), c = t[i]) {
            l = d = a[c], l = l.replace(r, n), f = l == d, f || (g = document, m = g.head || g.getElementsByTagName("head")[0] || g.documentElement, u = g.createElement(i), "link" == i && (u.rel = "stylesheet"), u[c] = l, u.onerror = function () {
                _cdnFallback(u)
            }, m.appendChild(u)), (new Image).src = "//tj.chepin.com/1.gif?net_error=1&fileurl=" + d;
            var s = l.indexOf(n) > -1 || l.indexOf(r) > -1, p = !o && f;
            p && s && (e.motify && e.motify.error && e.motify.error("啊哦，有东西加载失败了，刷新下试试~"), o = !0)
        }
    }
}(window), function (e) {
    "use strict";
    var o;
    e.localStorage;
    try {
        var t = new Date;
        try {
            localStorage.setItem(t, t)
        } catch (r) {
            if (22 === r.code)throw"localstorage define error"
        }
        var n = localStorage.getItem(t) == t;
        if (localStorage.removeItem(t), !n)throw"localstorage define error";
        if ("FUNCTION" != (typeof localStorage.clear).toUpperCase())throw"localstorage define error";
        o = localStorage
    } catch (r) {
        var a = function () {
            return null
        };
        o = {getItem: a, setItem: a, removeItem: a, clear: a}
    }
    "function" == typeof define && define.amd && define(function () {
        return o
    }), e.YZLocalStorage = o
}(window), function (e) {
    e.motify = e.motify || {
            error: function (e) {
                setTimeout(function () {
                    document.body.insertAdjacentHTML("afterbegin", '<div style="color:red;padding:5px;background:#fff;font-size:12px;border-bottom:1px solid #ddd;margin-bottom:5px;"><a style="border-radius:3px;line-height:18px;text-align:center;float:right;margin-left:5px;padding:4px 7px;color:#fff;background-color:#00BF05;" onclick="location.reload();">刷新</a> <p style="line-height:28px;padding-right:53px;word-break:break-all;margin:0;">' + e + "</p></div>")
                }, 500)
            }
        }, e.zenjs = e.zenjs || {}, e.__logs = [], e.Logger = {
        log: function (o) {
            e.__logs.push(o)
        }
    }
}(window);

"use strict";
!function(n,e){
    function t(n){
        return"complete"===n.readyState||"loaded"===n.readyState
    }
    function o(n,t,o){
        var c=e.createElement("link");
        c.rel="stylesheet",a(c,o,"css"),c.async=!0,c.href=n,d.appendChild(c)
    }
    function c(n,t,o){
        var c=e.createElement("script");
        c.charset="utf-8",a(c,o,"js"),c.async=!t.sync,c.src=n,d.appendChild(c)
    }
    function i(n,e){
        var t;n.sheet&&(t=!0),setTimeout(function(){t?e():i(n,e)},20)
    }
    function a(e,o,c){
        function a(){
            e.onload=e.onreadystatechange=null,e=null,o()
        }
        var r="onload"in e,u="css"===c;
        return!u||!f&&r?void(r?(e.onload=a,e.onerror=function(){
            e.onerror=null,n._cdnFallback(e)
        }):e.onreadystatechange=function(){
            t(e)&&a()
        }):void setTimeout(function(){
            i(e,o)
        },1)
    }
    function r(n,e,t,i){
        function a(){
            var t=e.indexOf(n);t>-1&&e.splice(t,1),0===e.length&&i()}l.test(n)?o(n,t,a):c(n,t,a)
    }
    function u(n,e,t){
        var o=function(){t&&t()
        };
        if(n=Array.prototype.slice.call(n||[]),0===n.length)
            return void o();
        for(var c=0,i=n.length;i>c;c++)r(n[c],n,e,o)
    }
    function s(e,o){
        if(t(e))
            o();
        else{
            var c=1500,i=!1;
            n.addEventListener("load",function(){
                i||(o(),i=!0)
            }),setTimeout(function(){
                i||(o(),i=!0)},c)
        }
    }
    var l=new RegExp("\\.css"),d=e.head||e.getElementsByTagName("head")[0],f=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536,v={async:function(n,t){s(e,function(){u(n,{},t)})},sync:function(n,t){s(e,function(){u(n,{sync:!0},t)})}};
    return n.Loader=v,v
}(window,document);

(function (window, _global) {
    var platform = navigator.userAgent.toLowerCase();
    var isIpad = (/ipad/gi).test(platform);
    if (!_global.is_mobile && !_global.is_owner_team && !isIpad && !_global.wap_view) {
        var winWidth = window.screen.width || document.documentElement.clientWidth;
        var winHeight = window.screen.height || document.documentElement.clientHeight;
        if (winWidth > 800 && winHeight > 800 || winWidth > 1025 || winHeight > 1025) {
            window.location = _global.goods_redirect_url;
        }
    }
})(window, window._global);